use ferris_says::say;
use std::io::{stdout,BufWriter};
use hello_rust::process::pay_strategy::{Alipay, PayStrategy, PayType, WechatPay};
use hello_rust::component::closures::{ShirtColor,Inventory};
use hello_rust::component::point::{tree_demo,arc_demo};
use hello_rust::component::concurrency::{chain_demo,two_url,stream};
use hello_rust::component::oop::{exe,blob_exe,pay_exe};
use hello_rust::component::macro_demo::{macro_exe};
fn main(){
    // let stdout = stdout();
    // let message = String::from("Hello, cKnight!");
    // let width = message.chars().count();
    // let mut writer = BufWriter::new(stdout.lock());
    // say(&message, width, &mut writer).unwrap();
    // println!("width: {}", width);
    // println!("message: {}", message);
    
    // println!("pay info: {}", PayType::WECHATPAY.get_pay_info());

    // let store = Inventory{
    //     shirts: vec![ShirtColor::Red, ShirtColor::Blue, ShirtColor::Blue],
    // };

    // let u1 = Some(ShirtColor::Red);
    // println!("u1: {:?}", store.giveaway(u1));

    // let u2 = None;
    // println!("u2: {:?}", store.giveaway(u2));

    // let s = String::from("value");
    // let f = || {
    //     println!("{}", s);
    // };
    // f();
    // f();
    // println!("{}", s)

    // let arr1 = vec![1, 2, 3];
    // let arr2:Vec<_> = arr1.iter().map(|x| x+1).collect();
    // println!("{:?}", arr2);

    // tree_demo();
    // arc_demo();

    // chain_demo();
    // one_url();
    // two_url();

    macro_exe();
    
}